package com.xinyue.auto.reader;

import org.dom4j.Element;

public class ManyReader{
	//私有构造器
	private ManyReader() {
	}
	//内部类
	private static class SingletonHolder{
        private static ManyReader instance = new ManyReader();  
    }
	/**
	 * 获得对象实例
	 */
	public static ManyReader getInstance() {
		return SingletonHolder.instance;
	}
	
	/**
	 * 读取一个XML文件中的many-many标签信息，并返回封装对象
	 * @param many
	 * @return
	 * @throws Exception
	 */
	public void read(Element many) throws Exception {
		Process process = ManyFactory.getInstance().initProccess(many);
		process.work();
	}
}
